package com.cnap.multiclouldmgmt.model.knowledge;

import com.cnap.multiclouldmgmt.util.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * 检查能不能删除
 * @author dyq
 */
@ApiModel(value = "com.cnap.multiclouldmgmt.model.knowledge.ErrorInjectModel",description = "故障注入场景")
public class ErrorInjectModel {

    //序号
    @ApiModelProperty(value = "序号")
    private int id;


    //故障模拟名称
    @ApiModelProperty(value = "故障模拟名称")
    private String errorName;

    //故障资源类型
    @ApiModelProperty(value = "集群名称")
    private String k8sClusterName;

    //故障资源类型
    @ApiModelProperty(value = "节点名称")
    private String nodeName;


    //故障资源类型
    @ApiModelProperty(value = "容器组名称")
    private String podName;


    @ApiModelProperty(value = "微服务id")
    private String microSvcId;


    //故障模拟内容
    @ApiModelProperty(value = "故障模拟内容")
    private String errorKey;

    //errorDesrcibe
    @ApiModelProperty(value = "errorDesrcibe")
    private String errorDesrcibe;

    //故障模拟命令
    @ApiModelProperty(value = "故障模拟命令")
    private String errorOrder;

    //故障模拟资源类型
    @ApiModelProperty(value = "故障模拟资源类型")
    private String errorResType;

    //故障模拟资源类型
    @ApiModelProperty(value = "故障执行的状态,stop,running")
    private String injectStatus;

    //故障模拟资源类型
    @ApiModelProperty(value = "故障执行的人")
    private String username;

    //故障模拟资源类型
    @ApiModelProperty(value = "故障执行时间")
    private Date updateTime;

    //故障模拟资源类型
    @ApiModelProperty(value = "故障执行时间格式化")
    private String updateTimeStr;

    //故障模拟资源类型
    @ApiModelProperty(value = "执行故障注入的id")
    private String runningId;

    /**
     * get
     *
     * @return ErrorDesrcibe
     */
    public String getErrorDesrcibe() {
        return errorDesrcibe;
    }

    /**
     * set
     *
     * @param errorDesrcibe errorDesrcibe
     */
    public void setErrorDesrcibe(String errorDesrcibe) {
        this.errorDesrcibe = errorDesrcibe;
    }

    /**
     * get
     *
     * @return K8sClusterName
     */
    public String getK8sClusterName() {
        return k8sClusterName;
    }

    /**
     * set
     *
     * @param k8sClusterName k8sClusterName
     */
    public void setK8sClusterName(String k8sClusterName) {
        this.k8sClusterName = k8sClusterName;
    }

    /**
     * get
     *
     * @return NodeName
     */
    public String getNodeName() {
        return nodeName;
    }

    /**
     * set
     *
     * @param nodeName nodeName
     */
    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    /**
     * get
     *
     * @return PodName
     */
    public String getPodName() {
        return podName;
    }

    /**
     * set
     *
     * @param podName podName
     */
    public void setPodName(String podName) {
        this.podName = podName;
    }

    /**
     * get
     *
     * @return MicroSvcId
     */
    public String getMicroSvcId() {
        return microSvcId;
    }

    /**
     * set
     *
     * @param microSvcId microSvcId
     */
    public void setMicroSvcId(String microSvcId) {
        this.microSvcId = microSvcId;
    }

    /**
     * get
     *
     * @return RunningId
     */
    public String getRunningId() {
        return runningId;
    }

    /**
     * set
     *
     * @param runningId runningId
     */
    public void setRunningId(String runningId) {
        this.runningId = runningId;
    }

    /**
     * get
     *
     * @return UpdateTimeStr
     */
    public String getUpdateTimeStr() {

        if (updateTime != null){
            updateTimeStr = DateUtils.changeDateFormatYYYY_MM_DD_HH_MM(updateTime);
        }

        return updateTimeStr;
    }

    /**
     * set
     *
     * @param updateTimeStr updateTimeStr
     */
    public void setUpdateTimeStr(String updateTimeStr) {
        this.updateTimeStr = updateTimeStr;
    }

    /**
     * get
     *
     * @return Id
     */
    public int getId() {
        return id;
    }

    /**
     * set
     *
     * @param id id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * get
     *
     * @return ErrorName
     */
    public String getErrorName() {
        return errorName;
    }

    /**
     * set
     *
     * @param errorName errorName
     */
    public void setErrorName(String errorName) {
        this.errorName = errorName;
    }

    /**
     * get
     *
     * @return ErrorKey
     */
    public String getErrorKey() {
        return errorKey;
    }

    /**
     * set
     *
     * @param errorKey errorKey
     */
    public void setErrorKey(String errorKey) {
        this.errorKey = errorKey;
    }

    /**
     * get
     *
     * @return ErrorOrder
     */
    public String getErrorOrder() {
        return errorOrder;
    }

    /**
     * set
     *
     * @param errorOrder errorOrder
     */
    public void setErrorOrder(String errorOrder) {
        this.errorOrder = errorOrder;
    }

    /**
     * get
     *
     * @return ErrorResType
     */
    public String getErrorResType() {
        return errorResType;
    }

    /**
     * set
     *
     * @param errorResType errorResType
     */
    public void setErrorResType(String errorResType) {
        this.errorResType = errorResType;
    }

    /**
     * get
     *
     * @return InjectStatus
     */
    public String getInjectStatus() {
        return injectStatus;
    }

    /**
     * set
     *
     * @param injectStatus injectStatus
     */
    public void setInjectStatus(String injectStatus) {
        this.injectStatus = injectStatus;
    }

    /**
     * get
     *
     * @return Username
     */
    public String getUsername() {
        return username;
    }

    /**
     * set
     *
     * @param username username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * get
     *
     * @return UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * set
     *
     * @param updateTime updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
